<?php

namespace api\energy\factory\water;

use api\energy\common\Request;

/**
 * 水表控制
 *
 * @method WaterMeterControl setaddress(string $data) 水表地址
 * @method WaterMeterControl settype(int $data) 操作类型 1: 查询状态 2: 开阀 3: 关阀
 */
class WaterMeterControl extends Request
{

    public function __construct(string $address = '', int $type = null)
    {
        $address && $this->setaddress($address);
        $type && $this->settype($type);
    }

    public function build()
    {
        $this->setUrl("/water/meter/control");
        $this->setMethod('POST');

        $this->setRequestData($this->getRequestData());
    }

}